/**\file NamedDescribedEntity.cpp
 *
 * Authors:
 * Frans Oliehoek <faolieho@science.uva.nl>
 * Matthijs Spaan <mtjspaan@isr.ist.utl.pt>
 *
 * Copyright 2008 Universiteit van Amsterdam, Instituto Superior Tecnico
 *
 * This file is part of MultiAgentDecisionProcess.
 *
 * MultiAgentDecisionProcess is free software: you can redistribute it
 * and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * MultiAgentDecisionProcess is distributed in the hope that it will
 * be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MultiAgentDecisionProcess.  If not, see
 * <http://www.gnu.org/licenses/>.
 *
 * $Id: NamedDescribedEntity.cpp 2151 2008-01-21 16:32:52Z mtjspaan $
 */

#include "NamedDescribedEntity.h"
#include <sstream>

using namespace std;

#define DEBUG_NDE 0

NamedDescribedEntity::NamedDescribedEntity(string name, string description) 
{
    _m_name = new string(name);
    _m_description = new string(description);
}
/// Copy assignment constructor.    
NamedDescribedEntity::NamedDescribedEntity(const NamedDescribedEntity& a)
{
if(DEBUG_NDE) cout << " |cloning NamedDescribedEntity "<<a.GetName()<<"|"<<endl;
    _m_name = new string(a.GetName());
    _m_description = new string(a.GetDescription());
}
NamedDescribedEntity::~NamedDescribedEntity()
{
if(DEBUG_NDE) cout << " |deleting NamedDescribedEntity "<<GetName()<<"|"<<endl;
    delete(_m_name);
    delete(_m_description);
}

string NamedDescribedEntity::SoftPrint() const 
{ 
    stringstream ss;
    ss << "name:" << this->GetName() 
       << " - descr." << this->GetDescription(); 
    return(ss.str());
}

string NamedDescribedEntity::SoftPrintBrief() const
{
    return(GetName());
}
